ccdash
Version:
Claude Code Dashboard - A comprehensive monitoring dashboard for Claude Code
1 lines • 31.6 kB
JavaScript
(()=>{var e={};e.id=747,e.ids=[747],e.modules={22:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(2688).A)("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},615:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(2688).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1841:(e,t,r)=>{"use strict";r.r(t),r.d(t,{GlobalError:()=>a.a,__next_app__:()=>u,pages:()=>d,routeModule:()=>h,tree:()=>c});var n=r(5239),s=r(8088),l=r(8170),a=r.n(l),o=r(893),i={};for(let e in o)0>["default","tree","pages","GlobalError","__next_app__","routeModule"].indexOf(e)&&(i[e]=()=>o[e]);r.d(t,i);let c={children:["",{children:["jobs",{children:["[id]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(r.bind(r,3012)),"/home/runner/work/ccdash/ccdash/frontend/app/jobs/[id]/page.tsx"]}]},{}]},{}]},{layout:[()=>Promise.resolve().then(r.bind(r,6637)),"/home/runner/work/ccdash/ccdash/frontend/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(r.t.bind(r,7398,23)),"next/dist/client/components/not-found-error"],forbidden:[()=>Promise.resolve().then(r.t.bind(r,9999,23)),"next/dist/client/components/forbidden-error"],unauthorized:[()=>Promise.resolve().then(r.t.bind(r,5284,23)),"next/dist/client/components/unauthorized-error"]}]}.children,d=["/home/runner/work/ccdash/ccdash/frontend/app/jobs/[id]/page.tsx"],u={require:r,loadChunk:()=>Promise.resolve()},h=new n.AppPageRouteModule({definition:{kind:s.RouteKind.APP_PAGE,page:"/jobs/[id]/page",pathname:"/jobs/[id]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:c}})},2570:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(2688).A)("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]])},3012:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});let n=(0,r(2907).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/ccdash/ccdash/frontend/app/jobs/[id]/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/ccdash/ccdash/frontend/app/jobs/[id]/page.tsx","default")},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3116:(e,t,r)=>{Promise.resolve().then(r.bind(r,6236))},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3873:e=>{"use strict";e.exports=require("path")},4972:(e,t,r)=>{Promise.resolve().then(r.bind(r,3012))},5071:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(2688).A)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},5336:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(2688).A)("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},6058:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(2688).A)("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]])},6236:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>eb});var n=r(687),s=r(3210),l=r(6189),a=r(4934),o=r(5192),i=r(9821),c=r(6269),d=r(4163),u=r(6059),h=r(1273),m=r(8599),p=r(3495),x=r(43),f=r(6156),v=r(569),b="ScrollArea",[g,j]=(0,h.A)(b),[w,y]=g(b),N=s.forwardRef((e,t)=>{let{__scopeScrollArea:r,type:l="hover",dir:a,scrollHideDelay:o=600,...i}=e,[c,u]=s.useState(null),[h,p]=s.useState(null),[f,v]=s.useState(null),[b,g]=s.useState(null),[j,y]=s.useState(null),[N,S]=s.useState(0),[C,A]=s.useState(0),[k,E]=s.useState(!1),[R,_]=s.useState(!1),T=(0,m.s)(t,e=>u(e)),P=(0,x.jH)(a);return(0,n.jsx)(w,{scope:r,type:l,dir:P,scrollHideDelay:o,scrollArea:c,viewport:h,onViewportChange:p,content:f,onContentChange:v,scrollbarX:b,onScrollbarXChange:g,scrollbarXEnabled:k,onScrollbarXEnabledChange:E,scrollbarY:j,onScrollbarYChange:y,scrollbarYEnabled:R,onScrollbarYEnabledChange:_,onCornerWidthChange:S,onCornerHeightChange:A,children:(0,n.jsx)(d.sG.div,{dir:P,...i,ref:T,style:{position:"relative","--radix-scroll-area-corner-width":N+"px","--radix-scroll-area-corner-height":C+"px",...e.style}})})});N.displayName=b;var S="ScrollAreaViewport",C=s.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:l,nonce:a,...o}=e,i=y(S,r),c=s.useRef(null),u=(0,m.s)(t,c,i.onViewportChange);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),(0,n.jsx)(d.sG.div,{"data-radix-scroll-area-viewport":"",...o,ref:u,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,n.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});C.displayName=S;var A="ScrollAreaScrollbar",k=s.forwardRef((e,t)=>{let{forceMount:r,...l}=e,a=y(A,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=a,c="horizontal"===e.orientation;return s.useEffect(()=>(c?o(!0):i(!0),()=>{c?o(!1):i(!1)}),[c,o,i]),"hover"===a.type?(0,n.jsx)(E,{...l,ref:t,forceMount:r}):"scroll"===a.type?(0,n.jsx)(R,{...l,ref:t,forceMount:r}):"auto"===a.type?(0,n.jsx)(_,{...l,ref:t,forceMount:r}):"always"===a.type?(0,n.jsx)(T,{...l,ref:t}):null});k.displayName=A;var E=s.forwardRef((e,t)=>{let{forceMount:r,...l}=e,a=y(A,e.__scopeScrollArea),[o,i]=s.useState(!1);return s.useEffect(()=>{let e=a.scrollArea,t=0;if(e){let r=()=>{window.clearTimeout(t),i(!0)},n=()=>{t=window.setTimeout(()=>i(!1),a.scrollHideDelay)};return e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",n),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",r),e.removeEventListener("pointerleave",n)}}},[a.scrollArea,a.scrollHideDelay]),(0,n.jsx)(u.C,{present:r||o,children:(0,n.jsx)(_,{"data-state":o?"visible":"hidden",...l,ref:t})})}),R=s.forwardRef((e,t)=>{var r;let{forceMount:l,...a}=e,o=y(A,e.__scopeScrollArea),i="horizontal"===e.orientation,c=U(()=>h("SCROLL_END"),100),[d,h]=(r={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},s.useReducer((e,t)=>r[e][t]??e,"hidden"));return s.useEffect(()=>{if("idle"===d){let e=window.setTimeout(()=>h("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(e)}},[d,o.scrollHideDelay,h]),s.useEffect(()=>{let e=o.viewport,t=i?"scrollLeft":"scrollTop";if(e){let r=e[t],n=()=>{let n=e[t];r!==n&&(h("SCROLL"),c()),r=n};return e.addEventListener("scroll",n),()=>e.removeEventListener("scroll",n)}},[o.viewport,i,h,c]),(0,n.jsx)(u.C,{present:l||"hidden"!==d,children:(0,n.jsx)(T,{"data-state":"hidden"===d?"hidden":"visible",...a,ref:t,onPointerEnter:(0,v.m)(e.onPointerEnter,()=>h("POINTER_ENTER")),onPointerLeave:(0,v.m)(e.onPointerLeave,()=>h("POINTER_LEAVE"))})})}),_=s.forwardRef((e,t)=>{let r=y(A,e.__scopeScrollArea),{forceMount:l,...a}=e,[o,i]=s.useState(!1),c="horizontal"===e.orientation,d=U(()=>{if(r.viewport){let e=r.viewport.offsetWidth<r.viewport.scrollWidth,t=r.viewport.offsetHeight<r.viewport.scrollHeight;i(c?e:t)}},10);return Z(r.viewport,d),Z(r.content,d),(0,n.jsx)(u.C,{present:l||o,children:(0,n.jsx)(T,{"data-state":o?"visible":"hidden",...a,ref:t})})}),T=s.forwardRef((e,t)=>{let{orientation:r="vertical",...l}=e,a=y(A,e.__scopeScrollArea),o=s.useRef(null),i=s.useRef(0),[c,d]=s.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=X(c.viewport,c.content),h={...l,sizes:c,onSizesChange:d,hasThumb:!!(u>0&&u<1),onThumbChange:e=>o.current=e,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:e=>i.current=e};function m(e,t){return function(e,t,r,n="ltr"){let s=G(r),l=t||s/2,a=r.scrollbar.paddingStart+l,o=r.scrollbar.size-r.scrollbar.paddingEnd-(s-l),i=r.content-r.viewport;return B([a,o],"ltr"===n?[0,i]:[-1*i,0])(e)}(e,i.current,c,t)}return"horizontal"===r?(0,n.jsx)(P,{...h,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){let e=Y(a.viewport.scrollLeft,c,a.dir);o.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollLeft=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollLeft=m(e,a.dir))}}):"vertical"===r?(0,n.jsx)(L,{...h,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){let e=Y(a.viewport.scrollTop,c);o.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollTop=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollTop=m(e))}}):null}),P=s.forwardRef((e,t)=>{let{sizes:r,onSizesChange:l,...a}=e,o=y(A,e.__scopeScrollArea),[i,c]=s.useState(),d=s.useRef(null),u=(0,m.s)(t,d,o.onScrollbarXChange);return s.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),(0,n.jsx)(M,{"data-orientation":"horizontal",...a,ref:u,sizes:r,style:{bottom:0,left:"rtl"===o.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===o.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":G(r)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,r)=>{if(o.viewport){let n=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(n),function(e,t){return e>0&&e<t}(n,r)&&t.preventDefault()}},onResize:()=>{d.current&&o.viewport&&i&&l({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:O(i.paddingLeft),paddingEnd:O(i.paddingRight)}})}})}),L=s.forwardRef((e,t)=>{let{sizes:r,onSizesChange:l,...a}=e,o=y(A,e.__scopeScrollArea),[i,c]=s.useState(),d=s.useRef(null),u=(0,m.s)(t,d,o.onScrollbarYChange);return s.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),(0,n.jsx)(M,{"data-orientation":"vertical",...a,ref:u,sizes:r,style:{top:0,right:"ltr"===o.dir?0:void 0,left:"rtl"===o.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":G(r)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,r)=>{if(o.viewport){let n=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(n),function(e,t){return e>0&&e<t}(n,r)&&t.preventDefault()}},onResize:()=>{d.current&&o.viewport&&i&&l({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:O(i.paddingTop),paddingEnd:O(i.paddingBottom)}})}})}),[D,z]=g(A),M=s.forwardRef((e,t)=>{let{__scopeScrollArea:r,sizes:l,hasThumb:a,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:c,onThumbPositionChange:u,onDragScroll:h,onWheelScroll:x,onResize:f,...b}=e,g=y(A,r),[j,w]=s.useState(null),N=(0,m.s)(t,e=>w(e)),S=s.useRef(null),C=s.useRef(""),k=g.viewport,E=l.content-l.viewport,R=(0,p.c)(x),_=(0,p.c)(u),T=U(f,10);function P(e){S.current&&h({x:e.clientX-S.current.left,y:e.clientY-S.current.top})}return s.useEffect(()=>{let e=e=>{let t=e.target;j?.contains(t)&&R(e,E)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[k,j,E,R]),s.useEffect(_,[l,_]),Z(j,T),Z(g.content,T),(0,n.jsx)(D,{scope:r,scrollbar:j,hasThumb:a,onThumbChange:(0,p.c)(o),onThumbPointerUp:(0,p.c)(i),onThumbPositionChange:_,onThumbPointerDown:(0,p.c)(c),children:(0,n.jsx)(d.sG.div,{...b,ref:N,style:{position:"absolute",...b.style},onPointerDown:(0,v.m)(e.onPointerDown,e=>{0===e.button&&(e.target.setPointerCapture(e.pointerId),S.current=j.getBoundingClientRect(),C.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),P(e))}),onPointerMove:(0,v.m)(e.onPointerMove,P),onPointerUp:(0,v.m)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=C.current,g.viewport&&(g.viewport.style.scrollBehavior=""),S.current=null})})})}),F="ScrollAreaThumb",H=s.forwardRef((e,t)=>{let{forceMount:r,...s}=e,l=z(F,e.__scopeScrollArea);return(0,n.jsx)(u.C,{present:r||l.hasThumb,children:(0,n.jsx)(I,{ref:t,...s})})}),I=s.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:l,...a}=e,o=y(F,r),i=z(F,r),{onThumbPositionChange:c}=i,u=(0,m.s)(t,e=>i.onThumbChange(e)),h=s.useRef(void 0),p=U(()=>{h.current&&(h.current(),h.current=void 0)},100);return s.useEffect(()=>{let e=o.viewport;if(e){let t=()=>{p(),h.current||(h.current=V(e,c),c())};return c(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[o.viewport,p,c]),(0,n.jsx)(d.sG.div,{"data-state":i.hasThumb?"visible":"hidden",...a,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:(0,v.m)(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),r=e.clientX-t.left,n=e.clientY-t.top;i.onThumbPointerDown({x:r,y:n})}),onPointerUp:(0,v.m)(e.onPointerUp,i.onThumbPointerUp)})});H.displayName=F;var W="ScrollAreaCorner",$=s.forwardRef((e,t)=>{let r=y(W,e.__scopeScrollArea),s=!!(r.scrollbarX&&r.scrollbarY);return"scroll"!==r.type&&s?(0,n.jsx)(q,{...e,ref:t}):null});$.displayName=W;var q=s.forwardRef((e,t)=>{let{__scopeScrollArea:r,...l}=e,a=y(W,r),[o,i]=s.useState(0),[c,u]=s.useState(0),h=!!(o&&c);return Z(a.scrollbarX,()=>{let e=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(e),u(e)}),Z(a.scrollbarY,()=>{let e=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(e),i(e)}),h?(0,n.jsx)(d.sG.div,{...l,ref:t,style:{width:o,height:c,position:"absolute",right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:0,...e.style}}):null});function O(e){return e?parseInt(e,10):0}function X(e,t){let r=e/t;return isNaN(r)?0:r}function G(e){let t=X(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd;return Math.max((e.scrollbar.size-r)*t,18)}function Y(e,t,r="ltr"){let n=G(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,l=t.scrollbar.size-s,a=t.content-t.viewport,o=function(e,[t,r]){return Math.min(r,Math.max(t,e))}(e,"ltr"===r?[0,a]:[-1*a,0]);return B([0,a],[0,l-n])(o)}function B(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}var V=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function s(){let l={left:e.scrollLeft,top:e.scrollTop},a=r.left!==l.left,o=r.top!==l.top;(a||o)&&t(),r=l,n=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(n)};function U(e,t){let r=(0,p.c)(e),n=s.useRef(0);return s.useEffect(()=>()=>window.clearTimeout(n.current),[]),s.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function Z(e,t){let r=(0,p.c)(t);(0,f.N)(()=>{let t=0;if(e){let n=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(r)});return n.observe(e),()=>{window.cancelAnimationFrame(t),n.unobserve(e)}}},[e,r])}var J=r(6241);let K=s.forwardRef(({className:e,children:t,...r},s)=>(0,n.jsxs)(N,{ref:s,className:(0,J.cn)("relative overflow-hidden",e),...r,children:[(0,n.jsx)(C,{className:"h-full w-full rounded-[inherit]",children:t}),(0,n.jsx)(Q,{}),(0,n.jsx)($,{})]}));K.displayName=N.displayName;let Q=s.forwardRef(({className:e,orientation:t="vertical",...r},s)=>(0,n.jsx)(k,{ref:s,orientation:t,className:(0,J.cn)("flex touch-none select-none transition-colors","vertical"===t&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:(0,n.jsx)(H,{className:"relative flex-1 rounded-full bg-border"})}));Q.displayName=k.displayName;var ee=r(6058),et=r(7840),er=r(5336),en=r(5071),es=r(9743),el=r(8559),ea=r(8122),eo=r(2570),ei=r(6349);let ec=(0,r(2688).A)("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);var ed=r(3964),eu=r(615),eh=r(22),em=r(9911),ep=r(329),ex=r(483);function ef(){let e=(0,l.useParams)(),t=(0,l.useRouter)(),r=e?.id,{t:d}=(0,ep.s)(),{job:u,loading:h,error:m,isRunning:p,refetch:x}=(0,em.JJ)(r),[f,v]=(0,s.useState)(!0),[b,g]=(0,s.useState)(null),j=e=>new Date(e).toLocaleString("ja-JP",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),w=async(e,t)=>{try{if(navigator.clipboard&&navigator.clipboard.writeText)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}g(t),setTimeout(()=>g(null),2e3)}catch{}};return h?(0,n.jsx)("div",{className:"min-h-screen bg-background flex items-center justify-center",children:(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto mb-4"}),(0,n.jsx)("p",{children:"ジョブ詳細を読み込み中..."})]})}):m?(0,n.jsx)("div",{className:"min-h-screen bg-background flex items-center justify-center",children:(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsxs)("p",{className:"text-red-600 mb-4",children:["エラー: ",m]}),(0,n.jsx)(a.$,{onClick:()=>t.push("/"),children:"戻る"})]})}):u?(0,n.jsxs)("div",{className:"min-h-screen bg-background",children:[(0,n.jsx)(ex.Y,{}),(0,n.jsxs)("div",{className:"container mx-auto max-w-7xl p-6 space-y-6",children:[(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[(0,n.jsxs)(a.$,{variant:"outline",size:"sm",onClick:()=>t.push("/?tab=tasks"),children:[(0,n.jsx)(el.A,{className:"w-4 h-4 mr-2"}),d("common.back")]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"text-2xl font-bold",children:d("job.title")}),(0,n.jsxs)("p",{className:"text-muted-foreground",children:["ジョブID: ",r]})]})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[(e=>{let t={pending:{color:"bg-yellow-100 text-yellow-800",icon:ee.A,label:"待機中"},running:{color:"bg-blue-100 text-blue-800",icon:et.A,label:"実行中"},completed:{color:"bg-green-100 text-green-800",icon:er.A,label:"完了"},failed:{color:"bg-red-100 text-red-800",icon:en.A,label:"失敗"},cancelled:{color:"bg-gray-100 text-gray-800",icon:es.A,label:"キャンセル"}}[e],r=t.icon;return(0,n.jsxs)(i.E,{className:t.color,children:[(0,n.jsx)(r,{className:"mr-1 h-3 w-3"}),t.label]})})(u.status),u.yolo_mode&&(0,n.jsx)(i.E,{variant:"outline",children:"YOLO Mode"}),p&&(0,n.jsxs)(i.E,{variant:"outline",className:"text-blue-600",children:[(0,n.jsx)(et.A,{className:"mr-1 h-3 w-3"}),"実行中"]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsxs)(a.$,{variant:"outline",size:"sm",onClick:x,disabled:h,children:[(0,n.jsx)(ea.A,{className:`mr-1 h-4 w-4 ${h?"animate-spin":""}`}),"更新"]}),(0,n.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,n.jsx)("input",{type:"checkbox",checked:f,onChange:e=>v(e.target.checked),className:"rounded"}),"自動更新"]})]})]}),(0,n.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,n.jsxs)(o.Zp,{children:[(0,n.jsx)(o.aR,{className:"pb-3",children:(0,n.jsxs)(o.ZB,{className:"text-sm flex items-center gap-2",children:[(0,n.jsx)(eo.A,{className:"h-4 w-4"}),"プロジェクト情報"]})}),(0,n.jsxs)(o.Wu,{className:"space-y-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-sm font-medium",children:u.project?.name}),(0,n.jsx)("div",{className:"text-xs text-muted-foreground",children:u.project?.path})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-muted-foreground",children:"実行ディレクトリ"}),(0,n.jsx)("div",{className:"text-sm font-mono",children:u.execution_directory})]})]})]}),(0,n.jsxs)(o.Zp,{children:[(0,n.jsx)(o.aR,{className:"pb-3",children:(0,n.jsxs)(o.ZB,{className:"text-sm flex items-center gap-2",children:[(0,n.jsx)(ei.A,{className:"h-4 w-4"}),"実行情報"]})}),(0,n.jsxs)(o.Wu,{className:"space-y-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-muted-foreground",children:"作成日時"}),(0,n.jsx)("div",{className:"text-sm",children:j(u.created_at)})]}),u.started_at&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-muted-foreground",children:"開始日時"}),(0,n.jsx)("div",{className:"text-sm",children:j(u.started_at)})]}),u.completed_at&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-muted-foreground",children:"完了日時"}),(0,n.jsx)("div",{className:"text-sm",children:j(u.completed_at)})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-muted-foreground",children:"実行時間"}),(0,n.jsx)("div",{className:"text-sm",children:((e,t)=>{if(!e)return"-";let r=new Date(e),n=Math.floor(((t?new Date(t):new Date).getTime()-r.getTime())/1e3);if(n<60)return`${n}秒`;let s=Math.floor(n/60);if(s<60)return`${s}分${n%60}秒`;let l=Math.floor(s/60);return`${l}時間${s%60}分`})(u.started_at,u.completed_at)})]}),u.pid&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-muted-foreground",children:"プロセスID"}),(0,n.jsx)("div",{className:"text-sm font-mono",children:u.pid})]}),void 0!==u.exit_code&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-muted-foreground",children:"終了コード"}),(0,n.jsx)("div",{className:"text-sm font-mono",children:u.exit_code})]})]})]})]}),(0,n.jsxs)(o.Zp,{children:[(0,n.jsx)(o.aR,{className:"pb-3",children:(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)(o.ZB,{className:"text-sm flex items-center gap-2",children:[(0,n.jsx)(ec,{className:"h-4 w-4"}),d("job.command")]}),(0,n.jsx)(a.$,{variant:"outline",size:"sm",onClick:()=>w(u.command,"command"),className:"h-6 w-6 p-0",children:"command"===b?(0,n.jsx)(ed.A,{className:"w-3 h-3"}):(0,n.jsx)(eu.A,{className:"w-3 h-3"})})]})}),(0,n.jsx)(o.Wu,{children:(0,n.jsx)("div",{className:"bg-gray-50 dark:bg-gray-900 p-3 rounded-md font-mono text-sm",children:u.command})})]}),(0,n.jsxs)(c.tU,{defaultValue:"output",className:"w-full",children:[(0,n.jsxs)(c.j7,{className:"grid w-full grid-cols-2",children:[(0,n.jsxs)(c.Xi,{value:"output",className:"flex items-center gap-2",children:[(0,n.jsx)(eh.A,{className:"h-4 w-4"}),d("job.outputLog")]}),(0,n.jsxs)(c.Xi,{value:"error",className:"flex items-center gap-2",children:[(0,n.jsx)(en.A,{className:"h-4 w-4"}),d("job.errorLog")]})]}),(0,n.jsx)(c.av,{value:"output",className:"mt-4",children:(0,n.jsxs)(o.Zp,{children:[(0,n.jsx)(o.aR,{className:"pb-3",children:(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)(o.ZB,{className:"text-sm",children:"標準出力"}),u.output_log&&(0,n.jsx)(a.$,{variant:"outline",size:"sm",onClick:()=>w(u.output_log||"","output"),className:"h-6 w-6 p-0",children:"output"===b?(0,n.jsx)(ed.A,{className:"w-3 h-3"}):(0,n.jsx)(eu.A,{className:"w-3 h-3"})})]})}),(0,n.jsx)(o.Wu,{children:(0,n.jsx)(K,{className:"h-96 w-full rounded-md border",children:(0,n.jsx)("div",{className:"p-4",children:u.output_log?(0,n.jsx)("pre",{className:"text-sm font-mono whitespace-pre-wrap",children:u.output_log}):(0,n.jsx)("div",{className:"text-sm text-muted-foreground",children:d("job.noOutputLog")})})})})]})}),(0,n.jsx)(c.av,{value:"error",className:"mt-4",children:(0,n.jsxs)(o.Zp,{children:[(0,n.jsx)(o.aR,{className:"pb-3",children:(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)(o.ZB,{className:"text-sm",children:"標準エラー出力"}),u.error_log&&(0,n.jsx)(a.$,{variant:"outline",size:"sm",onClick:()=>w(u.error_log||"","error"),className:"h-6 w-6 p-0",children:"error"===b?(0,n.jsx)(ed.A,{className:"w-3 h-3"}):(0,n.jsx)(eu.A,{className:"w-3 h-3"})})]})}),(0,n.jsx)(o.Wu,{children:(0,n.jsx)(K,{className:"h-96 w-full rounded-md border",children:(0,n.jsx)("div",{className:"p-4",children:u.error_log?(0,n.jsx)("pre",{className:"text-sm font-mono whitespace-pre-wrap text-red-600",children:u.error_log}):(0,n.jsx)("div",{className:"text-sm text-muted-foreground",children:d("job.noErrorLog")})})})})]})})]})]})]}):(0,n.jsx)("div",{className:"min-h-screen bg-background flex items-center justify-center",children:(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("p",{className:"mb-4",children:"ジョブが見つかりません"}),(0,n.jsx)(a.$,{onClick:()=>t.push("/"),children:"戻る"})]})})}function ev(){return(0,n.jsx)("div",{className:"min-h-screen bg-background flex items-center justify-center",children:(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto mb-4"}),(0,n.jsx)("p",{children:"ジョブ詳細を読み込み中..."})]})})}function eb(){return(0,n.jsx)(s.Suspense,{fallback:(0,n.jsx)(ev,{}),children:(0,n.jsx)(ef,{})})}},6269:(e,t,r)=>{"use strict";r.d(t,{tU:()=>R,av:()=>P,j7:()=>_,Xi:()=>T});var n=r(687),s=r(3210),l=r(569),a=r(1273),o=r(2942),i=r(6059),c=r(4163),d=r(43),u=r(5551),h=r(6963),m="Tabs",[p,x]=(0,a.A)(m,[o.RG]),f=(0,o.RG)(),[v,b]=p(m),g=s.forwardRef((e,t)=>{let{__scopeTabs:r,value:s,onValueChange:l,defaultValue:a,orientation:o="horizontal",dir:i,activationMode:m="automatic",...p}=e,x=(0,d.jH)(i),[f,b]=(0,u.i)({prop:s,onChange:l,defaultProp:a});return(0,n.jsx)(v,{scope:r,baseId:(0,h.B)(),value:f,onValueChange:b,orientation:o,dir:x,activationMode:m,children:(0,n.jsx)(c.sG.div,{dir:x,"data-orientation":o,...p,ref:t})})});g.displayName=m;var j="TabsList",w=s.forwardRef((e,t)=>{let{__scopeTabs:r,loop:s=!0,...l}=e,a=b(j,r),i=f(r);return(0,n.jsx)(o.bL,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:s,children:(0,n.jsx)(c.sG.div,{role:"tablist","aria-orientation":a.orientation,...l,ref:t})})});w.displayName=j;var y="TabsTrigger",N=s.forwardRef((e,t)=>{let{__scopeTabs:r,value:s,disabled:a=!1,...i}=e,d=b(y,r),u=f(r),h=A(d.baseId,s),m=k(d.baseId,s),p=s===d.value;return(0,n.jsx)(o.q7,{asChild:!0,...u,focusable:!a,active:p,children:(0,n.jsx)(c.sG.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":m,"data-state":p?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:h,...i,ref:t,onMouseDown:(0,l.m)(e.onMouseDown,e=>{a||0!==e.button||!1!==e.ctrlKey?e.preventDefault():d.onValueChange(s)}),onKeyDown:(0,l.m)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&d.onValueChange(s)}),onFocus:(0,l.m)(e.onFocus,()=>{let e="manual"!==d.activationMode;p||a||!e||d.onValueChange(s)})})})});N.displayName=y;var S="TabsContent",C=s.forwardRef((e,t)=>{let{__scopeTabs:r,value:l,forceMount:a,children:o,...d}=e,u=b(S,r),h=A(u.baseId,l),m=k(u.baseId,l),p=l===u.value,x=s.useRef(p);return s.useEffect(()=>{let e=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,n.jsx)(i.C,{present:a||p,children:({present:r})=>(0,n.jsx)(c.sG.div,{"data-state":p?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":h,hidden:!r,id:m,tabIndex:0,...d,ref:t,style:{...e.style,animationDuration:x.current?"0s":void 0},children:r&&o})})});function A(e,t){return`${e}-trigger-${t}`}function k(e,t){return`${e}-content-${t}`}C.displayName=S;var E=r(6241);let R=g,_=s.forwardRef(({className:e,...t},r)=>(0,n.jsx)(w,{ref:r,className:(0,E.cn)("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));_.displayName=w.displayName;let T=s.forwardRef(({className:e,...t},r)=>(0,n.jsx)(N,{ref:r,className:(0,E.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));T.displayName=N.displayName;let P=s.forwardRef(({className:e,...t},r)=>(0,n.jsx)(C,{ref:r,className:(0,E.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));P.displayName=C.displayName},7840:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(2688).A)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},8559:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(2688).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},9121:e=>{"use strict";e.exports=require("next/dist/server/app-render/action-async-storage.external.js")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9743:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(2688).A)("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]])},9911:(e,t,r)=>{"use strict";r.d(t,{JJ:()=>a,Os:()=>l,TI:()=>o,Wv:()=>i,YK:()=>c});var n=r(3210),s=r(9556);function l(e){let[t,r]=(0,n.useState)([]),[l,a]=(0,n.useState)(!0),[o,i]=(0,n.useState)(null),[c,d]=(0,n.useState)(0);return{jobs:t,loading:l,error:o,count:c,refetch:(0,n.useCallback)(async()=>{try{a(!0),i(null);let t=await s.F.jobs.getAll(e);r(t.jobs),d(t.count)}catch(e){i(e instanceof Error?e.message:"Failed to fetch jobs"),r([]),d(0)}finally{a(!1)}},[e])}}function a(e){let[t,r]=(0,n.useState)(null),[l,a]=(0,n.useState)(!0),[o,i]=(0,n.useState)(null),[c,d]=(0,n.useState)(!1);return{job:t,loading:l,error:o,isRunning:c,refetch:(0,n.useCallback)(async()=>{if(!e){r(null),a(!1);return}try{a(!0),i(null);let t=await s.F.jobs.getById(e);r(t.job),d(t.is_running)}catch(e){i(e instanceof Error?e.message:"Failed to fetch job"),r(null),d(!1)}finally{a(!1)}},[e])}}function o(){let[e,t]=(0,n.useState)(!1),[r,l]=(0,n.useState)(null);return{createJob:(0,n.useCallback)(async e=>{try{return t(!0),l(null),(await s.F.jobs.create(e)).job}catch(t){let e=t instanceof Error?t.message:"Failed to create job";throw l(e),Error(e)}finally{t(!1)}},[]),loading:e,error:r}}function i(){let[e,t]=(0,n.useState)(!1),[r,l]=(0,n.useState)(null);return{cancelJob:(0,n.useCallback)(async e=>{try{t(!0),l(null),await s.F.jobs.cancel(e)}catch(t){let e=t instanceof Error?t.message:"Failed to cancel job";throw l(e),Error(e)}finally{t(!1)}},[]),deleteJob:(0,n.useCallback)(async e=>{try{t(!0),l(null),await s.F.jobs.delete(e)}catch(t){let e=t instanceof Error?t.message:"Failed to delete job";throw l(e),Error(e)}finally{t(!1)}},[]),loading:e,error:r}}function c(){let[e,t]=(0,n.useState)([]),[r,l]=(0,n.useState)(!0),[a,o]=(0,n.useState)(null);return{projects:e,loading:r,error:a,refetch:(0,n.useCallback)(async()=>{try{l(!0),o(null);let e=await s.F.projects.getAll();t(e.projects)}catch(e){o(e instanceof Error?e.message:"Failed to fetch projects"),t([])}finally{l(!1)}},[])}}}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),n=t.X(0,[323,170,231,483],()=>r(1841));module.exports=n})();